package com.weetop.aklyscan.activity;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.text.TextUtils;
import android.util.Base64;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.weetop.aklyscan.R;

import ZPL.ZPLPrinterHelper;
import cc.shinichi.library.tool.utility.ui.ToastUtil;

public class DayinDialog2 extends Dialog {
    private Context mContext;
    private ImageView img;
    private TextView button,title,status, back,time;
    private String text;

    public DayinDialog2(Context context,String text) {
        super(context, R.style.promptDialog);
        setContentView(R.layout.dialog_dayin);
        mContext = context;
        this.text = text;
        initVar();
        initView();
        initAttr();
        initAction();
    }

    public void initVar() {
    }

    public void initView() {
        img = findViewById(R.id.img);
        title = findViewById(R.id.title);
        status = findViewById(R.id.status);
        back = findViewById(R.id.back);
        time = findViewById(R.id.time);
    }

    public void initAttr() {
        img.setImageResource(R.mipmap.dayinshibai);
        title.setText("打印机返回数据"+text);
        status.setText("打印失败");
        time.setVisibility(View.GONE);
    }

    public void initAction() {
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
